<?php
    function dept_profile_validation($form) { 
	
	//print_r($form); die;
	
    $stat = new set_static_variable(); 
	//Concerned Dept Validation
	//chk_concerned_dept($form['field_pro_dept']);
	
    //Duplicate Title field_pro_dept_value
	//check_title_duplication($form['title'], $form['type']['#value'], $form['field_pro_dept'], 'field_pro_dept', $stat->get_nid());
    $stat->set_nid(0);
	
//echo "ABC".$form['field_pro_other']['und'][0]['value']['#value'];
	
    // Check bad character validation
   
	chkbadchar($form['field_pro_pro']['und'][0]['value']['#value'],  $form['field_pro_pro']['und'][0]['value']['#title'],'field_pro_pro');
    chkbadchar($form['title']['#value'], $form['title']['#title'], 'title'); 
	chkbadchar($form['field_pro_other']['und'][0]['value']['#value'],$form['field_pro_other']['und'][0]['value']['#title'], 'field_pro_other'); 
											
	// maximum length validation for Title and Description Field
    maxlength_validation($form['title']['#value'], 255, $form['title']['#title'], 'title');
	
	// minimum length charcter 
	minilength_validation($form['title']['#value'], 5, $form['title']['#title'], 'title');
	minilength_validation($form['field_pro_pro']['und'][0]['value']['#value'], 5,  $form['field_pro_pro']['und'][0]['value']['#title'],'field_pro_pro');
	minilength_validation($form['field_pro_other']['und'][0]['value']['#value'], 5, $form['field_pro_other']['und'][0]['value']['#title'], 'field_pro_other');
	  
}


 